<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'index.jsp' starting page</title>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
  </head>
  
  <body>
	<!-- 格式化日期时间 -->
	<fmt:formatDate value="<%=new Date() %>" pattern="yyyy年MM月dd日" var="date" scope="request" />
	格式化时间: ${requestScope.date}<br>
	<!-- 格式化数字 -->
	<fmt:formatNumber value="3.141592653" pattern="###.######################" var="num1" scope="request" ></fmt:formatNumber>	
	<fmt:formatNumber value="3.141592653" pattern="000.0000000000000000000000" var="num2" scope="request" ></fmt:formatNumber>	
	格式化数字#:${num1}<br>
	格式化数字0:${num2}<br>
	
  </body>
</html>
